% Hacked from VIM Quick Reference Card
% Copyright (c) 2002 Laurent Gregoire.
% TeX Format




% Note:  Comment the following line (\input outopt.tex) if you want
% to generate yourself the card, either in DVI or PDF format.
% Uncomment the three next lines for PDF generation.
% Command for DVI : tex vimqrc.tex
% Command for PDF : pdftex vimqrc.tex


% \input outopt.tex

% \pdfoutput=1
\pdfpageheight=21cm
\pdfpagewidth=29.7cm


% Font definitions
\font\bigbf=cmbx12
\font\smallrm=cmr8
\font\smalltt=cmtt8
\font\tinyit=cmmi5


\def\\{\hfil\break}


\def\title#1{\hfil{\bf #1}\hfil\par\vskip 2pt\hrule}
\def\cm#1#2{{\tt#1} \dotfill {#2}\par}
\def\cmrev#1#2{{#1} \dotfill {\tt#2}\par}
\def\cmlong#1#2{{\tt#1}\\{}\indent{~~~}#2\par}
\def\cmlongrev#1#2{{#1}\\{}\indent{~~~}{\tt#2}\par}
\def\cn#1{\hfill$\lfloor$ #1\par}
\def\sect#1{\vskip 0.6cm {\it#1\/}\par}


% Characters definitions
\def\bs{$\backslash$}
\def\backspace{$\leftarrow$}
\def\ctrl{{\rm\char94}\kern-1pt}
\def\enter{$\hookleftarrow$}
\def\or{\thinspace{\tinyit{or}}\thinspace}
\def\key#1{$\langle${\rm{\it#1\/}}$\rangle$}
\def\rapos{\char125}
\def\lapos{\char123}
\def\bs{\char92}
\def\bt{\`{}}
\def\lt{\char60}
\def\gt{\char62}
\def\plus{$+$}
\def\lbracket{\char123}
\def\rbracket{\char125}
\def\tild{\char126}
\def\hat{\char94}
\def\percent{\char37}
\def\dollar{\char36}
\def\atsign{\char64}
\def\andsign{\char38}
\def\vertbar{\char124}
\def\placeholder{\lt{}\char43\char43\gt{}}
\def\brplaceholder{\lbracket{}\placeholder\rbracket{}}


% Three columns definitions
\parindent 0pt
\nopagenumbers
\hoffset=-1.56cm
\voffset=-1.54cm
\newdimen\fullhsize
\fullhsize=27.9cm
\hsize=8.5cm
\vsize=19cm
\def\fullline{\hbox to\fullhsize}
\let\lr=L
\newbox\leftcolumn
\newbox\midcolumn
\output={
  \if L\lr
    \global\setbox\leftcolumn=\columnbox
    \global\let\lr=M
  \else\if M\lr
    \global\setbox\midcolumn=\columnbox
    \global\let\lr=R
  \else
    \tripleformat
    \global\let\lr=L
  \fi\fi
  \ifnum\outputpenalty>-20000
  \else
    \dosupereject
  \fi}
\def\tripleformat{
  \shipout\vbox{\fullline{\box\leftcolumn\hfil\box\midcolumn\hfil\columnbox}}
  \advancepageno}
\def\columnbox{\leftline{\pagebody}}


\def\strikethrough#1{{%
\setbox0=\hbox{#1}%
\dimen0 0.8ex\dimen1\dimen0\advance\dimen1 by0.4pt
\rlap{\leaders\hrule height \dimen1 depth -\dimen0\hskip\wd0}%
\box0
}}




% Card content
% Header
%\hrule\vskip 3pt
\title{VimWiki REFERENCE CARD}


\sect{Open wiki}
\cm{$n$\bs{}ww}{Open index file of the $n$-th wiki}
\cm{$n$\bs{}wt}{Open index file in a tab}
\cm{\bs{}ws}{List and select available wikies}


\sect{Local mappings}
\cm{Enter}{Follow/Create WikiWord}
\cm{Shift+Enter}{Split and follow/create WikiWord}
\cm{Ctrl+Enter}{Vertical split and follow/create WikiWord}
\cm{Backspace}{Go back to previous WikiWord}
\cm{Tab}{Find next WikiWord}
\cm{Shift-Tab}{Find previous WikiWord}
\cm{\bs{}wd}{Delete WikiWord you are in}
\cm{\bs{}wr}{Rename WikiWord you are in}
\cm{Ctrl-Space}{Toggle list item on/off}
\cm{=}{Add or create header level}
\cm{-}{Remove header level}


\sect{Syntax}
\cm{*text*}{\bf{bold text}}
\cm{\_text\_}{\it{italic text}}
\cm{\~{}\~{}text\~{}\~{}}{\strikethrough{strikeout text}}
\cm{\^{}text\^{}}{$^{super}${}script}
\cm{,,text,,}{$_{sub}${}script}
\cm{\`{}code\`{}}{text without syntax}
\cm{4 Spaces text}{blockquote text}
\cm{----}{horizontal line}
\cm{<!-- text -->}{comment: not shown in HTML}
\\
\cm{= text =}{header level 1}
\cm{== text ==}{header level 2}
\cm{=== text ===}{header level 3}
\cm{==== text ====}{header level 4} 
\cm{===== text =====}{header level 5} 
\cm{====== text ======}{header level 6} 


\sect{Lists}
Indent list items with at least one space.\\
\cm{* item}{bulleted list}
\cm{\# item}{numbered list}
\cm{term:: definition}{definition list}


\sect{Text objects}
\cm{ah}{A header with leading empty lines}
\cm{ih}{Inner header without leading empty lines}
\cm{vah}{Select header with contents}
\cm{dah}{Delete header with contents}
\cm{yah}{Change header with contents}


\sect{Internal Links}
\cm{TextText}{WikiWord}
\cm{!TextText}{Not a WikiWord}
\cm{[[{Text text}]]}{Link with spaces}
\cm{[[{Text text $|$ Text}]]}{Link with description}


\sect{External links}
\cmrev{plain link:}{http://site/}
\cmrev{link with description}{[http://site/ home page]}
\cmrev{plain link to image}{http://site/pic.jpg}
\cmrev{link to local image}{[[images/pic.jpg]]\footnote{$^{1}$}{\smallrm Path to image relative to: vimwiki-option-path\_html}}
\cmrev{double bracketed link}{[[http://site/pic.jpg]]}
\cmrev{link with description}{[[http:$|$comment]]}
\cmrev{link with alternate text}{[[http:$|$comment$|$]]}
\cmrev{link to local file}{[[file://C:/book.pdf]]}
%\cmlongrev{file link with description}{[[file://C:/book.pdf Book]]}
\\
links with some style:\\
\indent{~~~}
\cmlongrev{with alternate text:}{[[http:$|$cool$|$width:150px; height:120px;]]}
\indent{~~~}
\cmlongrev{without alternate text:}{[[http:$||$width:150px; height:120px;]]}
\cmlongrev{thumnail links:}{[http://site/pic.jpg http://site/thumb.jpg]}
\indent{~~~}{\tt [[http://site/pic.jpg$|$http://site/thumb.jpg]]}


\sect{Paragraphs and Preformatted text}
\cm{<br>}{new line}

Paragraphs start from column one, no indentation and are divide by a blank line.
If the line starts from whitespace and is not a list it is "preformatted" text.

\\
\\
\sect{Tables}
\cm{$||$}{Separator of cells}
\cm{$|$--+--+--$|$}{Heading separator}
%\cm{$||$\ Center $||$}{Spaces left and right -- center align}
%\cm{$||$Left\ \ \ \ $||$}{No spaces left -- left align}
%\cm{$||$\ \ \ Right$||$}{No spaces right -- right align}
\cm{Alt+Left}{Shift column left}
\cm{Alt+Right}{Shift column right}
\cm{Tab / Shift+Tab}{Jump to the next / previous cell}
An indented table is centered in HTML.
\sect{Folding/Outline}


\cm{zM}{close all folds}
\cm{zr}{reduce folding one level}
\cm{zR}{open all folds} 


Folding on list items should work properly only if all of them are indented using current {\it shiftwidth}.\\


\sect{Global commands}
\cm{:VimwikiGoHome}{Open index of current wiki}
\cm{:VimwikiTabGoHome}{Open current index in new tab}
\cm{:VimwikiUISelect}{Open index of the selected wiki}


\sect{Local commands}
\cm{:VimwikiFollowWord}{Follow/create WikiWord}
\cm{:VimwikiSplitWord}{Split \& follow/create WikiWord}
\cm{:VimwikiVSplitWord}{Split vertical \& follow WikiWord}
\cm{:VimwikiGoBackWord}{To WikiWord you came from}
\cm{:VimwikiNextWord}{Find next WikiWord}
\cm{:VimwikiPrevWord}{Find previous WikiWord}
\cm{:VimwikiDeleteWord}{Delete WikiWord you are in}
\cm{:VimwikiRenameWord}{Rename WikiWord you are in}
\cm{:Vimwiki2HTML}{Convert current WikiPage to HTML}
\cm{:VimwikiAll2HTML}{Convert all WikiPages to HTML}  
\cm{:VimwikiToggleListItem}{Toggle list item on/off}
\cm{:VimwikiTableMoveColumnLeft}{Shift column left}
\cm{:VimwikiTableMoveColumnRight}{Shift column right}

% Footer
\vfill \hrule\smallskip
{\smallrm This card may be freely distributed under
the terms of the GNU general public licence}


% Ending
\supereject
\if L\lr \else\null\vfill\eject\fi
\if L\lr \else\null\vfill\eject\fi
\bye


% EOF
